<?php
$login = array('user1' => '12345', 'user2' => '4567', 'user3' => '15897', 'user4' => 'uiooo', 'user5' => '5897oi');
$user = $_POST['username'];
$password = $_POST['password'];
//echo $password;
if (isset($login[$user])) {
	if ($login[$user]==$password){
//	if (in_array($password, $login)) {
		echo '<h1>' . 'welcome ' . $user . '<h1>';
	} else {
//		header('Location: https://www.baidu.com/');
		header("Location:login.html");
	}
} else {
//	header('Location: https://www.baidu.com/');
	header("Location:login.html");
}
